package cn.tedu.task;

import javax.swing.*;

/**
 * 设计水雷潜艇类
 */
public class MineSubmarine extends SeaObject implements EnemyLife{

    /**
     * Instantiates a new Mine submarine.
     */
    public MineSubmarine(){
        super(63,19);
    }


    public void move(){
        x+=speed;
    }


    public ImageIcon getImage(){
        return Images.minesubm;
    }

    /**
     * 生成水雷 @return the mine
     *
     * @return the mine
     */
    public Mine shootMine(){

        return new Mine(this.x+this.width,this.y-11);
    }
    @Override
    public int getLife(){
        return 1; //打掉水雷潜艇，得1条命
    }

}














